home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / dismod.zip / DISMOD.DOC < prev    next >
Text File  |  1993-03-19  |  17KB  |  354 lines

  1.  
  2.  
  3. DISMOD    -  The Display and Modify editor
  4.  
  5. Utility Overview
  6.  
  7. DISMOD allows direct access to a disk file for display and editing purposes.
  8. It is a screen-oriented File Editor to be used with an IBM PC or PC compatible
  9. machine and an MS-DOS Version 2.00 compatible operating system. DISMOD's main
  10. features are:
  11.  
  12. 1) Full editing capabilities are available. The user can easily position to
  13. any byte in any given record. There are both Hexadecimal and ASCII
  14. modification modes. Direct disk patching becomes a simple task with DISMOD.
  15. Small changes in files can be made very quickly.
  16.  
  17. 2) DISMOD allows record advance, backspace, and absolute positioning. Paging
  18. back and forth through the file is accomplished at a keystroke. The user does
  19. not need to know any diskette information (such as number of sides, number of
  20. sectors, etc.).
  21.  
  22. 3) ASCII, Hex or case independent string searches are easily performed. There
  23. is a repeat command to position to subsequent occurrences of the same string.
  24. DISMOD searches the entire file, not just the current record. It searches for
  25. text or ASCII strings up to 16 characters in length. Hex search strings can be
  26. up to 8 bytes in length.
  27.  
  28. 4) The Print and List commands allow sending an individual record or any
  29. number of records to a printer.
  30.  
  31. 5) A Disk Mode is also available to work with an entire disk (at the sector
  32. level).
  33.  
  34. Throughout this manual, a character or word between vertical bars is used to
  35. represent a keyboard key. Thus the symbol, |RETURN|, refers to the keyboard
  36. key marked RETURN and not a six letter word. |P| means the "P" key etc.
  37.  
  38. ENTERING DISMOD
  39.  
  40. DISMOD may be entered simply by typing DISMOD and pressing |RETURN| (assuming
  41. DISMOD.EXE is on the default drive). Optionally, a drive and/or filename may
  42. be entered on the command line in the following format:
  43.  
  44.      DISMOD [d:][path\filename][.ext]
  45.  
  46. If no drive or filename was used when entering DISMOD, a prompt will appear
  47. for it. Answer this prompt by giving the filespec or drive you wish to
  48. examine/modify. The filename may consist of up to 79 characters, and may
  49. contain path names. To exit DISMOD at this point rather than entering a
  50. filespec, press the |RETURN| key, and control will return to the DOS level. If
  51. an illegal or improper filespec is given, the appropriate error message will
  52. appear, and the filespec prompt will re-display.
  53.  
  54. Hexadecimal notation in the form (X'nn') will be used to represent the current
  55. record number and relative byte number. After a valid filespec has been given,
  56. record X'0000' will appear on the screen, and be resident in the "edit
  57. buffer". The term "edit buffer" will refer to the portion of the file
  58. currently in the computer's memory which is simultaneously being displayed.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. The edit buffer (also referred to as current record) will contain one DISMOD
  68. record (256 bytes) at any given time. There will be two cursors flashing
  69. within the record (one cursor will be in the "ASCII" portion of the screen,
  70. the other cursor will be in the "Hex" display portion). Upon initially
  71. accessing a file, these cursors will be positioned over relative byte X'00' of
  72. record X'0000'. Throughout this documentation, the term "relative byte" will
  73. be used, and will indicate the byte number (X'00'-X'FF') relative to the
  74. beginning of the current record.
  75.  
  76. There will be an input cursor located on the lower portion of the screen
  77. following the message "Command". This will be referred to as the "command
  78. buffer", and will be used to pass commands to DISMOD.
  79.  
  80. Additional information shown on the screen will be the current record number,
  81. filespec, relative byte within the sector, etc. The following sample display
  82. shows where this information will be presented.
  83.  
  84.    0123456789ABCDEF   BYTE   00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
  85.  
  86.  | ......(.......KI | <00> | 00 FE 14 01 00 00 28 10 05 C3 08 00 00 00 4B 49 |
  87.  | ......DO.<....PR | <10> | 07 D0 0B 00 00 00 44 4F 06 3C 0E 00 00 00 50 52 |
  88.  | ......SI......SO | <20> | 15 08 02 0D 00 00 53 49 17 10 02 0F 00 00 53 4F |
  89.  | ......JL.g.= ..X | <30> | 0A 00 00 0A 00 00 4A 4C CD 67 02 3D 20 0C CD 58 |
  90.  | ..g.w#....=(..g. | <40> | 02 CD 67 02 77 23 10 F9 18 EE 3D 28 0B CD 67 02 |
  91.  | G.g......g.G.g.o | <50> | 47 CD 67 02 10 FB 18 E0 CD 67 02 47 CD 67 02 6F |
  92.  | ..g.g..., ...tC. | <60> | 05 CD 67 02 67 05 C9 D9 2C 20 0D E5 CD 74 43 E1 |
  93.  | .{............!. | <70> | 1C 7B D6 12 20 02 5F 14 7E D9 C9 01 88 0F 21 9B |
  94.  | ...A..+.....cPV. | <80> | 02 7E ED 41 D3 89 2B 05 F2 81 02 C9 63 50 56 08 |
  95.  | ......e......... | <90> | 18 00 18 18 00 09 65 09 00 00 00 00 00 00 00 00 |
  96.  | ................ | <A0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  97.  | ................ | <B0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  98.  | ................ | <C0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  99.  | ................ | <D0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  100.  | ................ | <E0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  101.  | ................ | <F0> | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
  102.           Record X'0000'     Byte X'84' => X'D3' = 1101 0011 = 211
  103.  D:PATH\FILENAME.EXT
  104.  
  105.  
  106. |A|        Enter ASCII modification mode
  107. |B|        Position to the Beginning of the file
  108. |C||RETURN|    Clear record with zeroes
  109. |E|        Position to the End of the file
  110. |F|        Enter Find mode and:
  111.  |A|        find ASCII string
  112.  |H|        find Hexadecimal string
  113.  |T|        find Text string
  114. |G|           Go to the next occurrence of last search
  115. |H|           Enter Hex modify mode
  116. |L||RETURN|    List disk file to printer
  117. |N||RETURN|    Enter a New file
  118. |P||RETURN|    Print current record in edit buffer
  119. |R|           Position to Record
  120. |S||RETURN|    Save current record in edit buffer
  121. |X||RETURN|    Exit DISMOD
  122. |ESCAPE|       Cancel current DISMOD command
  123. |RETURN|       Display DISMOD instruction set (Menu)
  124. |+| |=|        Advance one record in the file
  125. |-|           Backup one record in the file
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. Cursor Movement Commands
  134.  
  135. |@ nn|           Position cursor to relative byte X'nn'
  136. |Lt arrow|     Move cursor left one byte
  137. |Rt arrow|     Move cursor right one byte
  138. |Up arrow|     Move cursor up one line
  139. |Dn arrow|     Move cursor down one line
  140. |HOME|           Position cursor to relative byte X'00' of the current record
  141.  
  142. The @ positioning command requires a hex byte consisting of up to two hex
  143. digits. This may be any number X'0' through X'FF'. However, if a single digit
  144. is used (no leading zero), the |RETURN| key must be pressed in order to
  145. execute the command. This is because the |@| command expects two digits. If
  146. two digits are used, the command will execute immediately after the second one
  147. is typed.
  148.  
  149. This arrangement is used throughout DISMOD whenever information must be
  150. supplied in addition to the command key. Merely remember to press |RETURN| if
  151. nothing occurs after typing in a command. This is especially true for the
  152. strings used in all of the FIND subcommands.
  153.  
  154. The arrows may be used from within either the ASCII or Hex modification modes
  155. to position within the buffer. The "@" command will not be accepted during
  156. either modify mode.
  157.  
  158. The cursor movement commands will not wrap into either a prior or a subsequent
  159. record. To switch records, use the record manipulation commands. No cursor
  160. movement will occur if an attempt is made to violate buffer boundaries.
  161.  
  162. RECORD MANIPULATION COMMANDS - FILE MODE
  163.  
  164. |+|    Advance one record sequentially in the file. For example, if the
  165. current record is X'000C', after pressing |+|, record X'000D' would be
  166. displayed (provided that it exists). Issuing the |+| command will not change
  167. the position of the relative byte cursors.
  168.  
  169. |-|    Back up one record sequentially in the file. If the current record is
  170. X'0087', after pressing |-|, record X'0086' would be displayed. Issuing the
  171. |-| command does not change the position of the relative byte cursors. The |-|
  172. command will be ignored if it is issued when record X'0000' is being
  173. displayed.
  174.  
  175. |B|    Position to the beginning of the file (record X'0000') and position
  176. cursors to relative byte X'00'.
  177.  
  178. |E|    Position to the end of the file. Although 256 bytes are shown, the
  179. true end of file may not be at relative byte X'FF'. Any modifications made to
  180. bytes beyond the true EOF offset byte are usually superfluous.
  181.  
  182. |R|nnnn Position to Record X'nnnn', provided record X'nnnn' exists in the
  183. file. If the record does not exist the request will be ignored. After entering
  184. |R|, the prompt Record X'    ' will appear in the command buffer. The input
  185. for the record number will be taken within the single quotes. Hex digits (0-F)
  186. must be entered. Any other characters will be ignored. |ESCAPE| will cancel
  187. this command. The user may enter the record number without using the standard
  188. four digit (X'nnnn') format. Simply type in the record number and press
  189. |RETURN|. For example, if the desired record number is X'0021', type |R||2||1|
  190. and press |RETURN|. The position of the relative byte cursors will remain
  191. unchanged after positioning to the new record.
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. DISMOD MODIFICATION COMMANDS
  199.  
  200. |A| Enters the ASCII Modification Mode. In this mode, modifications can be
  201. made directly in ASCII. Any character that can be generated from the keyboard
  202. (with the exceptions of the |ESCAPE| key and the cursor motion keys) can be
  203. directly entered into the edit buffer. Modifications can be made by
  204. positioning the cursor over the bytes to be changed. After the |A| command is
  205. issued the command buffer will display "ASCII Modify". From this point on, any
  206. characters entered will be taken as modifications to the bytes in the edit
  207. buffer. After a character is entered, the cursors will position to the next
  208. character in the edit buffer. If the cursors are positioned at the last
  209. character in the edit buffer, no advance will occur. The arrow keys may be
  210. used to position the cursor without altering the buffer contents. Any changes
  211. made to the buffer WILL NOT automatically be written to the file. In order to
  212. save changes to the file, see the |S|ave command. To exit the ASCII modify
  213. mode, press the |ESCAPE| key.
  214.  
  215. |H| Enters the Hexadecimal Modification Mode. In this mode, modifications to
  216. bytes in the edit buffer are accomplished by typing hexadecimal digits. After
  217. the |H| command is issued, the command buffer will display "Hex Modify". From
  218. this point on, hexadecimal digits (0-F) must be entered to modify bytes in the
  219. buffer. Note that since a single byte is represented by two hex digits, hex
  220. modify edits one nibble (half a byte) at a time. The arrow keys may also be
  221. used to position the cursors for additional editing. To exit the Hex modify
  222. mode, press the |ESCAPE| key. Like the ASCII Modification Mode, no changes are
  223. automatically made to the file. To make the modifications to the file, see the
  224. |S|ave command.
  225.  
  226. |C||RETURN| Clears the buffer contents from the cursor position to the end of
  227. the buffer by filling it with X'00'. Some files have erroneous or random
  228. information past the end-of-file offset byte in the last record. The clear
  229. command can be used to overwrite the remainder of the buffer with zeroes to
  230. facilitate viewing. Again, since none of the edits perform an automatic write
  231. to disk, |S| is necessary to save the buffer contents.
  232.  
  233. |S||RETURN|  Save the contents of the current edit buffer to disk. The current
  234. record will overwrite the contents of the disk record.
  235.  
  236. DISMOD Control Commands
  237.  
  238. |N||RETURN|  Causes a prompt for a new filespec. DISMOD will clear the screen,
  239. print its sign-on message, and prompt the user for a new filespec.
  240.  
  241. |X||RETURN|  Exit to operating system.
  242.  
  243. |RETURN| The |RETURN| key is used as a confirmation to complete most commands
  244. that result in significant alteration of the current record. |RETURN| alone
  245. will display a menu containing most of the DISMOD commands, and a brief
  246. description of their use. Pressing |RETURN| at the menu page will return to
  247. the display mode.
  248.  
  249. |ESCAPE|  The |ESCAPE| key is used to abort a DISMOD command in progress.
  250.  
  251.  
  252. DISMOD OUTPUT COMMANDS
  253.  
  254. |P||RETURN|  Print the current buffer contents, to a printer. If the printer
  255. is not on line, the error message "Printer Not Ready" will be displayed.
  256. Pressing |RETURN| at the error will attempt to print again. Pressing |ESCAPE|
  257. will abort the operation. Note: if a printer is not physically connected,
  258. DISMOD may not display an error message. Pressing ESCAPE will exit the print
  259. mode, however, and return to the command mode.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. |L||RETURN| List the file to a line printer starting with the current buffer.
  267. The listing will terminate when the end of the file is encountered, or when
  268. |ESCAPE| is pressed. Error handling works exactly as with the |P| command.
  269.  
  270.  
  271. DISMOD SEARCH COMMANDS
  272.  
  273. |F| Enters the FIND mode. A "FIND" prompt will appear in the command line. A
  274. subcommand declaring the type of search must be entered. After entering the
  275. subcommand, an appropriate prompt will display followed by a data entry space
  276. in quote marks. The following are the three FIND sub-commands:
  277.  
  278.        |A| Find ASCII "string". This is a literal search for the exact ASCII
  279. characters entered. "string" is a group of from one to sixteen ASCII
  280. characters. If less than 16 characters are typed, the |RETURN| key must be
  281. pressed to initiate the search.
  282.  
  283.        |H| Find Hexadecimal "string". This is a literal search for the exact
  284. hexadecimal bytes entered. "string" is a group of up to 16 hex digits (8
  285. bytes). Only the valid hex characters (0-F) will be accepted.
  286.  
  287.        |T| Find Text "string". This is a search for ASCII characters ignoring
  288. differences in case. The same restrictions which apply to |A| apply to |T|.
  289.  
  290. |G| Go to the next occurrence of the last searched string. It simply looks for
  291. the last "find" item specified again. It also "remembers" the last search
  292. criterion as long as DISMOD is active. This means that searches through
  293. different files for the same string are possible without the re-entry of the
  294. string.
  295.  
  296. Pressing |ESCAPE| at any time during the input sequence or search will cause
  297. DISMOD to display the record which was current before the search started.
  298. During a search, only the current record number being searched will appear on
  299. the screen. If the search string is not found, or if a disk error occurs, the
  300. appropriate error message will be displayed and the file will be positioned to
  301. the record current before the search began.
  302.  
  303.  
  304. DISK MODE
  305.  
  306. Occasionally it is desirable to work with an entire disk as opposed to a
  307. single file. For this purpose, the DISMOD disk mode makes it possible to treat
  308. the entire disk as a file. DISMOD commands will work as described for the file
  309. mode except as described below. To enter the disk mode, simply give the
  310. drivespec (drive letter followed by a colon) at the "Filespec:" prompt.
  311.  
  312. The standard format of an MS-DOS 2.00 disk uses 512 byte sectors. Since only
  313. 256 bytes can be displayed at a time with DISMOD, a backslash character "\"
  314. will appear after the record number to indicate the second 256 bytes of a
  315. sector.
  316.  
  317. |R| nnnn  Position to Record X'nnnn' on disk. The Record number consists of
  318. the absolute sector number. For example, typing |R||0||0||1||5| would position
  319. to sector X'15', the twenty first sector of the disk. Pressing |RETURN|
  320. following the record number is required only for requests consisting of less
  321. than four digits. For example, position to sector 4 could be accomplished by
  322. typing |R||4||RETURN|. The |R| command always positions to the first 256 bytes
  323. of a sector.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332. |B| Position to Beginning of Disk (Cylinder 0, Sector 0). After issuing a |B|,
  333. the current Record number would be X'0000', and the first 256 bytes would be
  334. displayed.
  335.  
  336. |E| Position to End of Disk. The actual sector number would depend on the type
  337. of disk. The second half of the sector will be displayed in the buffer.
  338.  
  339. |+| Position to next sector or the second half of the current sector.
  340.  
  341. |-| Position to previous sector or the first half of the current sector.
  342.  
  343.  
  344. DISK I/O Errors
  345.  
  346. As with any hardware, there is always that chance of something going wrong.
  347. This could happen when reading from or writing to a disk. For some reason,
  348. some component failed to do its job. The problem could be in the disk media,
  349. the disk drive, the disk controller, or the computer. Whenever an I/O error
  350. occurs, DISMOD reports the error and waits for operator input. When the
  351. current buffer is displayed, the information in it may not be valid, depending
  352. on the disk error.
  353.  
  354.